package org.twdata.pipeline;

// SAX imports:
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;

/**  Defines a contextual, recycleable class. */
public interface Stage {

    /**
     *  Gets the id
     *
     *@return    The id value
     */
    public String getId();


    /**
     *  Sets the id
     *
     *@param  id  The unique id
     */
    public void setId(String id);


    /**
     *  Sets up the instance for the current context
     *
     *@param  ctx                    The pipeline context
     *@exception  PipelineException  If anything goes wrong
     */
    public void setup(PipelineContext ctx)
        throws PipelineException;


    /**  Recycles the instance for another use */
    public void recycle();
}

